<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="../../commons/taglibs.jsp"%>
<%@ include file="../../commons/list.jsp"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta charset="utf-8">
  <title>汽车内部配置详情</title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <style type="text/css">
  	.layui-input{
  		width: 400px;
  	}
  	.layui-form-pane .layui-form-label{
  		width: 200px;
  	}
  </style>
</head>

<body>
<div>
	<div style="padding: 100px;padding-top: 0px">
		<form class="layui-form layui-form-pane"  action="">
			<input type="hidden" id='entityId' name='entityId' value="${carDetailInConfig.id }">
			<input type="hidden" name='carmodelid' value="${carmodelid }">
			
	   		 <div class="layui-form-item">
			     <label class="layui-form-label">真皮方向盘</label>
			     <div class="layui-input-inline">
			         <input type="text" name="leathersteeringwheel" id='leathersteeringwheel' placeholder="请输入真皮方向盘" value="${carDetailInConfig.leathersteeringwheel }" class="layui-input">
			     </div>
			 </div>
			 
			 <div class="layui-form-item">
			     <label class="layui-form-label">方向盘电动调节</label>
			     <div class="layui-input-inline">
			         <input type="text" name="steeringwheeladjustment" id='steeringwheeladjustment' placeholder="请输入方向盘电动调节" value="${carDetailInConfig.steeringwheeladjustment }" class="layui-input">
			     </div>
			 </div>
			 
			 <div class="layui-form-item">
			     <label class="layui-form-label">多功能方向盘</label>
			     <div class="layui-input-inline">
			         <input type="text" name="steeringwheelofelectriccontrol" id='steeringwheelofelectriccontrol' placeholder="请输入多功能方向盘" value="${carDetailInConfig.steeringwheelofelectriccontrol }" class="layui-input">
			     </div>
			 </div>
				
			 <div class="layui-form-item">
			     <label class="layui-form-label">方向盘换挡</label>
			     <div class="layui-input-inline">
			         <input type="text" name="steeringwheelshift" id='steeringwheelshift' placeholder="请输入方向盘换挡" value="${carDetailInConfig.steeringwheelshift }" class="layui-input">
			     </div>
			 </div>
			 
			 <div class="layui-form-item">
			     <label class="layui-form-label">方向盘加热</label>
			     <div class="layui-input-inline">
			         <input type="text" name="steeringwheelheating" id='steeringwheelheating' placeholder="请输入方向盘加热" value="${carDetailInConfig.steeringwheelheating }" class="layui-input">
			     </div>
			 </div>
				
			 <div class="layui-form-item">
			     <label class="layui-form-label">定速巡航</label>
			     <div class="layui-input-inline">
			         <input type="text" name="cruisecontrol" id='cruisecontrol' placeholder="请输入定速巡航" value="${carDetailInConfig.cruisecontrol }" class="layui-input">
			     </div>
			 </div>
			 
			 <div class="layui-form-item">
			     <label class="layui-form-label">前/后驻车雷达</label>
			     <div class="layui-input-inline">
			         <input type="text" name="parkingradar" id='parkingradar' placeholder="请输入前/后驻车雷达" value="${carDetailInConfig.parkingradar }" class="layui-input">
			     </div>
			 </div>
			 
			 <div class="layui-form-item">
			     <label class="layui-form-label">倒车视频影像</label>
			     <div class="layui-input-inline">
			         <input type="text" name="reversevideophotography" id='reversevideophotography' placeholder="请输入倒车视频影像" value="${carDetailInConfig.reversevideophotography }" class="layui-input">
			     </div>
			 </div>
				
			<div class="layui-form-item">
			     <label class="layui-form-label">倒车视频影像</label>
			     <div class="layui-input-inline">
			         <input type="text" name="drivingcomputerdispaly" id='drivingcomputerdispaly' placeholder="请输入行车电脑显示屏" value="${carDetailInConfig.drivingcomputerdispaly }" class="layui-input">
			     </div>
			 </div>
			 
			 <div class="layui-form-item">
			     <label class="layui-form-label">HUD抬头数字显示</label>
			     <div class="layui-input-inline">
			         <input type="text" name="hud" id='hud' placeholder="请输入行车电脑显示屏" value="${carDetailInConfig.hud }" class="layui-input">
			     </div>
			 </div>
			 
			 <div class="layui-form-item" style="width: 85%;padding-left: 200px;padding-top: 30px">
			    <div class="layui-input-block">
			      <button class="layui-btn" id='tjsub' lay-submit lay-filter="formDemo">立即提交</button>
		    	</div>
		  	</div>
		</form>
	</div>
 </div>
<script>

layui.use(['form'], function () {
    var $ = layui.jquery
        ,form = layui.form
        ,layer= layui.layer;
    
     var form = layui.form;
	  
	  //监听提交
	  form.on('submit(formDemo)', function(data){
		  var field = JSON.parse(JSON.stringify(data.field));
		  var img = field.img;
		  field.img = $("#imgAddress").val();
	  	//提交成功后禁用按钮
		$("#tjsub").css("pointer-events","none"); 
	    //layer.msg(JSON.stringify(data.field));
	    $.post("<%=basePath%>/controller/carDetailInConfig/save",field,function (data){
	    	if(data == '0'){
	    		$("#tjsub").css("pointer-events","auto");
	    		layer.msg('提交成功', {time:1000}); 
	    		setTimeout("window.location.reload();",1500); 
	    	}else{
	    		$("#tjsub").css("pointer-events","auto");
	    		layer.msg('提交失败', {time:1000}); 
	    	}
	    })
	    return false;
	  });
    
});

</script>
</body>
</html>
